#include <iostream>
using namespace std;

const int n = 7;
int G[n][n] = {{0,1,0,1,1,0,1},\
               {1,0,1,0,0,0,0},\
               {0,1,0,1,0,0,0},\
               {1,0,1,0,0,0,0},\
               {1,0,0,0,0,1,0},\
               {0,0,0,0,1,0,1},\
               {1,0,0,0,0,1,0}};
int vis[n][n];

void euler(int u) {
    for (int v = 0; v < n; ++v) if (G[u][v] && !vis[u][v]) {
        cout << u << "->" << v << endl;
        vis[u][v] = vis[v][u] = 1;
        euler(v);
    }
}

int main() {
    euler(0);
}
